{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "Itc5-hjBF8ni"
   },
   "source": [
    "# Setup"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "vU2V5yeKF8nj"
   },
   "outputs": [],
   "source": [
    "%%capture\n",
    "%pip install --quiet poetry  # Fixes https://github.com/python-poetry/poetry/issues/532\n",
    "%pip install --quiet git+https://github.com/oughtinc/ergo.git@7f88222f5f7a2e552eb1750d43b6c7924d2f0361"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 106
    },
    "colab_type": "code",
    "id": "76Mh-oRhF8nq",
    "outputId": "be970085-ea57-4b03-87fc-ec1d57ff4852"
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/dist-packages/ergo/ppl.py:15: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
      "  from tqdm.autonotebook import tqdm\n",
      "/usr/local/lib/python3.6/dist-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.\n",
      "  import pandas.util.testing as tm\n"
     ]
    }
   ],
   "source": [
    "import ergo\n",
    "import datetime\n",
    "import pandas as pd;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "PWJNUXO8F8nv"
   },
   "outputs": [],
   "source": [
    "%load_ext google.colab.data_table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "T6f31sOmF8nz"
   },
   "outputs": [],
   "source": [
    "metaculus = ergo.Metaculus(username=\"oughtpublic\", password=\"123456\", api_domain=\"pandemic\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "YhPFt4LtF8n3"
   },
   "source": [
    "# Dashboard"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "JHczQw9OF8n4"
   },
   "source": [
    "## Resolved questions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "bv0cfvpXF8n5"
   },
   "outputs": [],
   "source": [
    "resolved_predictions = metaculus.make_questions_df(metaculus.get_questions_json(question_status=\"resolved\", player_status=\"predicted\", pages=9999))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 241
    },
    "colab_type": "code",
    "id": "eY7wANEGF8n-",
    "outputId": "d3087bd3-b521-4b4a-f89e-652a3dd1cf7e"
   },
   "outputs": [
    {
     "data": {
      "application/vnd.google.colaboratory.module+javascript": "\n      import \"https://ssl.gstatic.com/colaboratory/data_table/a6224c040fa35dcf/data_table.js\";\n\n      window.createDataTable({\n        data: [[{\n            'v': 0,\n            'f': \"0\",\n        },\n\"When will El Paso County, Texas, experience its first peak number of COVID infections?\",\n\"2020-05-06 20:58:00\",\nfalse,\n\"https://pandemic.metaculus.com/api2/questions/4128/\",\n{\n            'v': 4128,\n            'f': \"4128\",\n        }],\n [{\n            'v': 1,\n            'f': \"1\",\n        },\n\"How many new infections will be reported in El Paso on the day on which the number of new reported infections peaks?\",\n\"2020-05-07 21:00:00\",\nfalse,\n\"https://pandemic.metaculus.com/api2/questions/4137/\",\n{\n            'v': 4137,\n            'f': \"4137\",\n        }],\n [{\n            'v': 2,\n            'f': \"2\",\n        },\n\"What will the average number of reported daily infections be in El Paso, over the 6th, 7th and 8th days after the first \\\"peak\\\"?\",\n\"2020-05-07 21:10:00\",\nfalse,\n\"https://pandemic.metaculus.com/api2/questions/4170/\",\n{\n            'v': 4170,\n            'f': \"4170\",\n        }],\n [{\n            'v': 3,\n            'f': \"3\",\n        },\n\"What will the average number of reported daily infections be in El Paso, over the 3rd, 4th and 5th days after the first \\\"peak\\\"?\",\n\"2020-05-07 21:11:00\",\nfalse,\n\"https://pandemic.metaculus.com/api2/questions/4152/\",\n{\n            'v': 4152,\n            'f': \"4152\",\n        }]],\n        columns: [[\"number\", \"index\"], [\"string\", \"title\"], [\"string\", \"resolve_time\"], [\"string\", \"i_created\"], [\"string\", \"url\"], [\"number\", \"id\"]],\n        columnOptions: [{\"width\": \"1px\", \"className\": \"index_column\"}],\n        rowsPerPage: 25,\n        helpUrl: \"https://colab.research.google.com/notebooks/data_table.ipynb\",\n        suppressOutputScrolling: true,\n        minimumWidth: undefined,\n      });\n    ",
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>resolve_time</th>\n",
       "      <th>i_created</th>\n",
       "      <th>url</th>\n",
       "      <th>id</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>When will El Paso County, Texas, experience it...</td>\n",
       "      <td>2020-05-06 20:58:00</td>\n",
       "      <td>False</td>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>4128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>How many new infections will be reported in El...</td>\n",
       "      <td>2020-05-07 21:00:00</td>\n",
       "      <td>False</td>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>4137</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>What will the average number of reported daily...</td>\n",
       "      <td>2020-05-07 21:10:00</td>\n",
       "      <td>False</td>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>4170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>What will the average number of reported daily...</td>\n",
       "      <td>2020-05-07 21:11:00</td>\n",
       "      <td>False</td>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>4152</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                               title  ...    id\n",
       "0  When will El Paso County, Texas, experience it...  ...  4128\n",
       "1  How many new infections will be reported in El...  ...  4137\n",
       "2  What will the average number of reported daily...  ...  4170\n",
       "3  What will the average number of reported daily...  ...  4152\n",
       "\n",
       "[4 rows x 5 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {
      "tags": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "resolved_predictions[[\"title\", \"resolve_time\", \"i_created\", \"url\", \"id\"]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "8i6UUSOQF8oE"
   },
   "source": [
    "## Open questions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "X9-iq-9NF8oE"
   },
   "outputs": [],
   "source": [
    "open = metaculus.make_questions_df(metaculus.get_questions_json(question_status=\"open\", player_status=\"any\", pages=9999))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "ULc8Jli1F8oJ"
   },
   "source": [
    "### Published in or after Mar 1 2020, closing in 2020"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "n2XBOGkbF8oL"
   },
   "outputs": [],
   "source": [
    "open_mar_or_after = open[open[\"publish_time\"] >= datetime.datetime(2020,3,1)]\n",
    "and_closes_in_2020 = open_mar_or_after[open_mar_or_after[\"close_time\"] <= datetime.datetime(2020,12,31)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 1000
    },
    "colab_type": "code",
    "id": "bznsr8vhF8oQ",
    "outputId": "3e497f57-f040-4741-9b78-81fb8e605f25"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>url</th>\n",
       "      <th>page_url</th>\n",
       "      <th>id</th>\n",
       "      <th>author</th>\n",
       "      <th>title</th>\n",
       "      <th>status</th>\n",
       "      <th>resolution</th>\n",
       "      <th>created_time</th>\n",
       "      <th>publish_time</th>\n",
       "      <th>close_time</th>\n",
       "      <th>resolve_time</th>\n",
       "      <th>possibilities</th>\n",
       "      <th>can_use_powers</th>\n",
       "      <th>last_activity_time</th>\n",
       "      <th>activity</th>\n",
       "      <th>comment_count</th>\n",
       "      <th>votes</th>\n",
       "      <th>prediction_timeseries</th>\n",
       "      <th>prediction_histogram</th>\n",
       "      <th>title_short</th>\n",
       "      <th>user_vote</th>\n",
       "      <th>user_community_vis</th>\n",
       "      <th>my_predictions</th>\n",
       "      <th>author_name</th>\n",
       "      <th>anon_prediction_count</th>\n",
       "      <th>last_read</th>\n",
       "      <th>comment_count_snapshot</th>\n",
       "      <th>public_metaculus_prediction</th>\n",
       "      <th>i_created</th>\n",
       "      <th>i_predicted</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/4413/how-many-deaths-due-to-pediatr...</td>\n",
       "      <td>4413</td>\n",
       "      <td>111848</td>\n",
       "      <td>How many deaths due to pediatric multisystem i...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-05-15 13:30:39</td>\n",
       "      <td>2020-05-16 01:00:00</td>\n",
       "      <td>2020-10-15 16:00:00</td>\n",
       "      <td>2021-10-15 16:00:00</td>\n",
       "      <td>{'low': False, 'high': 'tail', 'type': 'contin...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-18T14:16:24.801714Z</td>\n",
       "      <td>2.564933e-01</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>[{'t': 1589602628.6685908, 'distribution': {'s...</td>\n",
       "      <td>[[0.0, 0.0465656871092071, 0.0580006852882065]...</td>\n",
       "      <td>How many deaths due to pediatric multisy</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>juancambeiro1015</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/4412/how-many-cases-of-pediatric-mu...</td>\n",
       "      <td>4412</td>\n",
       "      <td>111848</td>\n",
       "      <td>How many cases of pediatric multisystem inflam...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-05-15 13:11:02</td>\n",
       "      <td>2020-05-16 01:00:00</td>\n",
       "      <td>2020-10-15 16:00:00</td>\n",
       "      <td>2021-10-15 16:00:00</td>\n",
       "      <td>{'low': False, 'high': 'tail', 'type': 'contin...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-18T14:16:43.640575Z</td>\n",
       "      <td>2.516943e-01</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>[{'t': 1589602667.3532898, 'distribution': {'s...</td>\n",
       "      <td>[[0.0, 0.0580176158132155, 0.0531949651184189]...</td>\n",
       "      <td>How many cases of pediatric multisystem</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>juancambeiro1015</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/4347/when-will-daily-commercial-fli...</td>\n",
       "      <td>4347</td>\n",
       "      <td>111975</td>\n",
       "      <td>When will daily commercial flights exceed 75,000?</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-05-04 18:11:44</td>\n",
       "      <td>2020-05-15 06:00:00</td>\n",
       "      <td>2020-10-31 15:00:00</td>\n",
       "      <td>2024-12-31 15:00:00</td>\n",
       "      <td>{'low': False, 'high': 'tail', 'type': 'contin...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-18T14:55:16.183371Z</td>\n",
       "      <td>5.877251e-03</td>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>[{'t': 1589572551.9579647, 'distribution': {'s...</td>\n",
       "      <td>[[0.0, 0.641153274966369, 0.716776114719101], ...</td>\n",
       "      <td>When will daily commercial flights excee</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>FedericoRuiz</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/4401/when-will-the-world-health-org...</td>\n",
       "      <td>4401</td>\n",
       "      <td>104761</td>\n",
       "      <td>When will the World Health Organization declar...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-05-11 13:19:59</td>\n",
       "      <td>2020-05-13 22:00:00</td>\n",
       "      <td>2020-06-01 07:00:00</td>\n",
       "      <td>2022-01-01 08:00:00</td>\n",
       "      <td>{'low': False, 'high': 'tail', 'type': 'contin...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-17T18:43:10.077245Z</td>\n",
       "      <td>1.470927e+00</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>[{'t': 1589416188.9815905, 'distribution': {'s...</td>\n",
       "      <td>[[0.0, 1.22430857815232, 1.3475034004088], [0....</td>\n",
       "      <td>Date WHO will declare end to COVID-19 pandemic:</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>Tamay</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/4400/by-august-1-how-many-tests-for...</td>\n",
       "      <td>4400</td>\n",
       "      <td>104761</td>\n",
       "      <td>By August 1, how many tests for COVID-19 will ...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-05-11 13:02:44</td>\n",
       "      <td>2020-05-13 22:00:00</td>\n",
       "      <td>2020-07-15 13:02:44</td>\n",
       "      <td>2020-08-25 07:00:00</td>\n",
       "      <td>{'low': 'tail', 'high': 'tail', 'type': 'conti...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-17T19:10:30.699168Z</td>\n",
       "      <td>7.122478e-01</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>[{'t': 1589407303.08717, 'distribution': {'s':...</td>\n",
       "      <td>[[0.0, 8.05235762090612e-05, 6.97396401104234e...</td>\n",
       "      <td>COVID-19 tests administered in the US by June 1:</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>Tamay</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>130</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/3779/will-all-major-2020-us-preside...</td>\n",
       "      <td>3779</td>\n",
       "      <td>105951</td>\n",
       "      <td>Will all major 2020 US presidential candidates...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-03-03 13:14:34</td>\n",
       "      <td>2020-03-07 11:00:00</td>\n",
       "      <td>2020-09-01 21:59:00</td>\n",
       "      <td>2021-01-05 11:12:00</td>\n",
       "      <td>{'type': 'binary'}</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-17T22:54:38.324175Z</td>\n",
       "      <td>2.746075e-03</td>\n",
       "      <td>66</td>\n",
       "      <td>35</td>\n",
       "      <td>[{'t': 1583585407.2581003, 'distribution': {'a...</td>\n",
       "      <td>[[0.01, 1.0, 0.00116721175132924], [0.02, 0.0,...</td>\n",
       "      <td>Will all major 2020 US presidential cand</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>Sylvain</td>\n",
       "      <td>20</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>131</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/3763/how-many-covid-19-cases-in-the...</td>\n",
       "      <td>3763</td>\n",
       "      <td>100059</td>\n",
       "      <td>How many COVID-19 cases in the US federal legi...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-02-29 00:44:55</td>\n",
       "      <td>2020-03-06 23:00:00</td>\n",
       "      <td>2020-12-01 19:59:00</td>\n",
       "      <td>2021-01-01 19:59:00</td>\n",
       "      <td>{'low': False, 'high': False, 'type': 'continu...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-18T15:22:28.767123Z</td>\n",
       "      <td>9.537149e-06</td>\n",
       "      <td>19</td>\n",
       "      <td>7</td>\n",
       "      <td>[{'t': 1583558098.582141, 'distribution': {'s'...</td>\n",
       "      <td>[[0.0, 4.66504516640291, 5.9855561974126], [0....</td>\n",
       "      <td>How many COVID-19 cases in the US federa</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>jimrandomh</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>132</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/3697/will-a-woman-be-the-democratic...</td>\n",
       "      <td>3697</td>\n",
       "      <td>109828</td>\n",
       "      <td>Will a woman be the Democratic candidate for V...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-02-18 23:11:32</td>\n",
       "      <td>2020-03-06 23:00:00</td>\n",
       "      <td>2020-06-01 06:59:00</td>\n",
       "      <td>2020-07-17 06:59:00</td>\n",
       "      <td>{'type': 'binary'}</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-18T00:23:19.895156Z</td>\n",
       "      <td>8.618573e-03</td>\n",
       "      <td>23</td>\n",
       "      <td>14</td>\n",
       "      <td>[{'t': 1583544976.5562198, 'distribution': {'a...</td>\n",
       "      <td>[[0.01, 1.0, 0.920308836342217], [0.02, 0.0, 0...</td>\n",
       "      <td>Will a woman be the Democratic candidate</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>seahen123</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>133</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/3781/which-month-of-2020-will-see-t...</td>\n",
       "      <td>3781</td>\n",
       "      <td>103304</td>\n",
       "      <td>Which month of 2020 will see the biggest globa...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-03-04 10:25:53</td>\n",
       "      <td>2020-03-06 23:00:00</td>\n",
       "      <td>2020-12-14 23:00:00</td>\n",
       "      <td>2021-03-30 22:00:00</td>\n",
       "      <td>{'low': False, 'high': False, 'type': 'continu...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-17T17:51:57.352616Z</td>\n",
       "      <td>2.051358e-07</td>\n",
       "      <td>13</td>\n",
       "      <td>27</td>\n",
       "      <td>[{'t': 1583552704.6951475, 'distribution': {'s...</td>\n",
       "      <td>[[0.0, 0.128193037057533, 0.0278611757382078],...</td>\n",
       "      <td>Month in 2020 with biggest global increase of ...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>isinlor</td>\n",
       "      <td>8</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>134</th>\n",
       "      <td>https://pandemic.metaculus.com/api2/questions/...</td>\n",
       "      <td>/questions/3755/what-will-be-the-ratio-of-fata...</td>\n",
       "      <td>3755</td>\n",
       "      <td>101229</td>\n",
       "      <td>What will be the ratio of fatalities to total ...</td>\n",
       "      <td>A</td>\n",
       "      <td>None</td>\n",
       "      <td>2020-02-28 17:43:31</td>\n",
       "      <td>2020-03-05 23:00:00</td>\n",
       "      <td>2020-08-31 04:00:00</td>\n",
       "      <td>2021-01-01 05:00:00</td>\n",
       "      <td>{'low': 'tail', 'high': 'tail', 'type': 'conti...</td>\n",
       "      <td>True</td>\n",
       "      <td>2020-05-18T15:31:19.232101Z</td>\n",
       "      <td>5.146506e+00</td>\n",
       "      <td>243</td>\n",
       "      <td>83</td>\n",
       "      <td>[{'t': 1583450484.78277, 'distribution': {'s':...</td>\n",
       "      <td>[[0.0, 0.124353407789494, 0.0965835114081494],...</td>\n",
       "      <td>Ratio of COVID-19 fatalities to infections thr...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>ignorance.prior</td>\n",
       "      <td>74</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>92 rows × 30 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                   url  ... i_predicted\n",
       "3    https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "5    https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "6    https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "9    https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "10   https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "..                                                 ...  ...         ...\n",
       "130  https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "131  https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "132  https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "133  https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "134  https://pandemic.metaculus.com/api2/questions/...  ...       False\n",
       "\n",
       "[92 rows x 30 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {
      "tags": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "and_closes_in_2020"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "name": "prediction-dashboard.ipynb",
   "provenance": []
  },
  "jupytext": {
   "cell_metadata_filter": "-all",
   "main_language": "python",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
